// 传入对应数据列表,根据类别、名字进行数据查找

function findData(dataList, category, name) {
  let result = [];
  for (let i = 0; i < dataList.length; i++) {
    if (dataList[i][category] == name) {
      result.push(dataList[i]);
    }
  }
  return result;
}
// 再进行效率优化

function findData(dataList, category, name) {
  let result = [];
  for (let i = 0; i < dataList.length; i++) {
    if (dataList[i][category] == name) {
      result.push(dataList[i]);
    }
  }
  return result;
}


